<div class="headerTitle">
    <h3>Bình luận của thành viên</h3>
    {if $intTotal > $intLimit}
        {paging total=$intTotal limit=$intLimit offset=$intOffset url=$strUrl div="nComment"}
    {/if} 
</div>
{if $arrComment}
    <div class="commentItem">
        {foreach key=i item=cmt from=$arrComment}
            {assign var="info" value=$cmt.info}
            <div class="commentItems {if ($i eq 0)}firstChild{/if}">
                <div class="userInfo">
                    <h4><a href="{vfriend_username userid=$cmt.userid viewid=$AppUI->id}">{$cmt.userid|ouser}</a></h4>
                    {image viewid=$AppUI->id type=1 class="border50" userid=$cmt.userid}				
                    <ul>
                        <li>
                            <span class="firstItem">Bài viết:</span>
                            <span class="lastItem"><strong>{$cmt.ustat.tnews|number_format:0:",":"."}</strong></span>
                        </li>
                        <li>
                            <span class="firstItem">Tài hùng biện:</span>
                            <span class="lastItem"><strong>{$cmt.ustat.lnews|number_format:0:",":"."}</strong></span>
                        </li>
                    </ul>
                </div>
                <div class="commentContent">
                    {if $cmt.quote}
                        <div class="quote">
                            <h4>Trích từ <a href="{vfriend_username userid=$info->id viewid=$AppUI->id}"><strong>{$info->fullnamevn}</strong></a></h4>                        
                            {$cmt.quote.short_content|html_wordwrap:255}{if $cmt.quote.short_content|html_wordwrap|strlen >= 255}...<a href="javascript:;" onclick="javascript:viewCmt({$cmt.quote.ncommentid})">xem đầy đủ</a>{/if}
                        </div>
                    {/if}
                    <div class="content">{$cmt.content}</div>
                    <div class="stat">
                        <span class="nLevel"><a href="{if $AppUI->id > 0}javascript:likeCmt({if isset($intNewId) && $intNewId > 0}{$intNewId}{else}{$row.newid}{/if},{$cmt.ncommentid},{$intPage});{else}{$smarty.const.LINK_INDEX_LOGIN}{/if}">Điểm hùng biện</a>&nbsp;(<strong>{$cmt.tlike|number_format:0:",":"."}</strong>)</span>
                        {if ($cmt.userid == $AppUI->id || $AppUI->id == $row.userid) && $AppUI->id > 0 }                    	
                            <span class="iDelete"><a href="javascript:;" onclick="javascript:deleteCmt({if isset($intNewId) && $intNewId > 0}{$intNewId}{else}{$row.newid}{/if},{$cmt.ncommentid},{$intPage});">Xóa</a></span>
                            
                        {/if}
                        <span class="iQuote"><a href="{if $AppUI->id > 0}javascript:addQuote({$cmt.userid|ouser:"hex"},{$cmt.ncommentid},'{$cmt.content|escape}');{else}{$smarty.const.LINK_INDEX_LOGIN}{/if}">Trích dẫn</a></span>
                        <span class="iTime">{$cmt.postdate|date_format:"%H:%M - %d/%m/%Y"}</span>
                        {if $cmt.quote}
                            <span class="stt"><a href="javascript:;" onclick="javascript:viewCmt({$cmt.quote.ncommentid})" class="gray">#{$cmt.quote.ncommentid}</a></span>
                        {/if}
                    </div>
                </div>
            </div>
        {/foreach} 
    </div>  
    {if $intTotal > $intLimit}
        {paging total=$intTotal limit=$intLimit offset=$intOffset url=$strUrl div="nComment"}
    {/if} 
{/if}

